<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.14.
   家居公司视频列表($$)*/

!defined('Q_PATH') && exit;

class Video_C_Controller extends InitController{

	public function index(){
		$arrJiajucompany=$this->_oParent->_arrJiajucompany;
		
		Core_Extend::getSeo($this,array(
			'title'=>"{$arrJiajucompany['jiajucompany_fullname']}视频展示",
			'keywords'=>"{$arrJiajucompany['jiajucompany_fullname']}视频展示",
			'description'=>"{$arrJiajucompany['jiajucompany_fullname']}视频展示",
		));

		// 视频列表
		$arrWhere=array();
		$arrWhere['jiajuvideo_status']=1;
		$arrWhere['jiajucompany_id']=$arrJiajucompany['jiajucompany_id'];

		$nTotal=Model::F_('jiajuvideo')->where($arrWhere)->getCounts();
		$oPage=Page::RUN($nTotal,15,Jiaju_Extend::getVideopageUrl($arrJiajucompany,false));
		$arrVideos=Model::F_('jiajuvideo')
			->setColumns('jiajuvideo_id,jiajuvideo_title,create_dateline')
			->where($arrWhere)
			->order('jiajuvideo_id DESC')
			->limit($oPage->S(),$oPage->N())
			->getAll();

		$this->assign('arrVideos',$arrVideos);
		$this->assign('nTotalVideo',$nTotal);
		$this->assign('sPageNavbar',$oPage->P(array('id'=>'pagination','style'=>'li','current'=>'active')));
		$this->display(Jiaju_Extend::getTemplate($arrJiajucompany,'video'));
	}

}
